package com.neo.sk.models
import models.Tables
import models.Tables.MoFinishTagRow
import org.slf4j.LoggerFactory
import slick.driver.MySQLDriver.simple._
import com.neo.sk.util.DBUtil._
/**
 * User: Huangshanqi
 * Date: 2015/7/13
 * Time: 17:38
 */
object MovieFinishTag {
  private final val logger = LoggerFactory.getLogger(getClass)


  def findAll  = db.withSession{
    implicit session  =>{
      Tables.MoFinishTag.list
    }
  }
  def add(finishTag:MoFinishTagRow) = db.withSession{
    implicit session  =>{
      Tables.MoFinishTag += finishTag
    }
  }
  def getAllFinishTagName = db.withSession{
    implicit session  =>{
      Tables.MoFinishTag.map(t => t.name).list
    }
  }
}
